﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using FrienDev.Data;
using FrienDev.BusinessRules;

public partial class Controls_Common_SelectFriends : System.Web.UI.UserControl
{
    private string m_UIds;
    public string UIds
    {
        get
        {
            return m_UIds;
        }
        set
        {
            m_UIds = value;
        }
    }

    public string StaticFullName
    {
        get
        {
            return m_StaticFullName;
        }
        set
        {
            m_StaticFullName = value;
        }
    }
    private string m_StaticFullName=string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        
        UIds = GetQueryStringValue("uids", "0");
        if (UIds != "0")
        {
            User user = UserRules.Instance.GetUserByUserId(m_UIds);
            StaticFullName = user.FullName;
        }
        

    }
    #region Protected Method
    protected int GetQueryStringValue(string QueryName, int nullValue)
    {

        if (string.IsNullOrEmpty(this.Page.Request.QueryString[QueryName]))
        {
            return nullValue;
        }
        return Convert.ToInt32(this.Page.Request.QueryString[QueryName]);
    }
    protected string GetQueryStringValue(string QueryName, string nullValue)
    {

        if (string.IsNullOrEmpty(this.Page.Request.QueryString[QueryName]))
        {
            return nullValue;
        }
        return this.Page.Request.QueryString[QueryName];
    }

    protected bool GetQueryStringValue(string QueryName, bool nullValue)
    {
        if (string.IsNullOrEmpty(this.Page.Request.QueryString[QueryName]))
        {
            return nullValue;
        }
        return Convert.ToBoolean(this.Page.Request.QueryString[QueryName]);
    }
    #endregion
}
